home *** CD-ROM | disk | FTP | other *** search
/ Best of www.BestZips.com (Collector's Edition) / Best of WWW.BESTZIPS.COM Collector's Edition (JCSM Shareware) (JCS Marketing).ISO / prgtools / prtsut53.zip / SU1SRC.ZIP / UNITMAIN.PAS < prev   
Pascal/Delphi Source File  |  1997-02-02  |  4KB  |  167 lines

  1. unit Unitmain;
  2.  
  3. interface
  4.  
  5. uses WinTypes, WinProcs, Classes, Graphics, Forms, Controls, Buttons,
  6.   StdCtrls, Fdemo01, FDemo02, FDemo03, FDemo04, FDemo05, FDemo06, FDemo07,
  7.   FDemo08, FDemo09, FDemo10, FDemo11, FDemo12, FDemo13, FDemo14, FDemo15,
  8.   FDemo16, FDemo17, FDemo18, FDemo19, FDemo20, ExtCtrls, Dialogs;
  9.  
  10. type
  11.   TMainDialog = class(TForm)
  12.     Label1: TLabel;
  13.     Panel1: TPanel;
  14.     Bevel1: TBevel;
  15.     ListBox1: TListBox;
  16.     View: TButton;
  17.     Exit: TButton;
  18.     Printer: TButton;
  19.     Printit: TLabel;
  20.     Label3: TLabel;
  21.     PrinterSetupDialog1: TPrinterSetupDialog;
  22.     procedure ExitClick(Sender: TObject);
  23.     procedure ViewClick(Sender: TObject);
  24.     procedure PrinterClick(Sender: TObject);
  25.     procedure ListBox1DblClick(Sender: TObject);
  26.   private
  27.     { Private declarations }
  28.   public
  29.     { Public declarations }
  30.   end;
  31.  
  32. var
  33.   MainDialog: TMainDialog;
  34.  
  35. implementation
  36.  
  37. {$R *.DFM}
  38.  
  39. procedure TMainDialog.ExitClick(Sender: TObject);
  40. begin
  41.     Close;
  42. end;
  43.  
  44. procedure TMainDialog.ViewClick(Sender: TObject);
  45. begin
  46.     if ListBox1.ItemIndex < 0 then
  47.     MessageDlg('Please select an option from the List Box', mtInformation,
  48.       [mbOk], 0);
  49.  
  50.     if (ListBox1.ItemIndex >= 0) then begin
  51.        case ListBox1.ItemIndex of
  52.        0: begin
  53.            Form01 := TForm01.Create (Application);
  54.           Form01.ShowModal;
  55.           Form01.Free;
  56.           end;
  57.        1: begin
  58.            Form02 := TForm02.Create (Application);
  59.           Form02.ShowModal;
  60.           Form02.Free;
  61.           end;
  62.        2: begin
  63.            Form03 := TForm03.Create (Application);
  64.           Form03.ShowModal;
  65.           Form03.Free;
  66.           end;
  67.        3: begin
  68.            Form04 := TForm04.Create (Application);
  69.           Form04.ShowModal;
  70.           Form04.Free;
  71.           end;
  72.        4: begin
  73.            Form05 := TForm05.Create (Application);
  74.           Form05.ShowModal;
  75.           Form05.Free;
  76.           end;
  77.        5: begin
  78.            Form06 := TForm06.Create (Application);
  79.           Form06.ShowModal;
  80.           Form06.Free;
  81.           end;
  82.        6: begin
  83.            Form07 := TForm07.Create (Application);
  84.           Form07.ShowModal;
  85.           Form07.Free;
  86.           end;
  87.        7: begin
  88.            Form08 := TForm08.Create (Application);
  89.           Form08.ShowModal;
  90.           Form08.Free;
  91.           end;
  92.        8: begin
  93.            Form09 := TForm09.Create (Application);
  94.           Form09.ShowModal;
  95.           Form09.Free;
  96.           end;
  97.        9: begin
  98.            Form10 := TForm10.Create (Application);
  99.           Form10.ShowModal;
  100.           Form10.Free;
  101.           end;
  102.       10: begin
  103.            Form11 := TForm11.Create (Application);
  104.           Form11.ShowModal;
  105.           Form11.Free;
  106.           end;
  107.       11: begin
  108.            Form12 := TForm12.Create (Application);
  109.           Form12.ShowModal;
  110.           Form12.Free;
  111.           end;
  112.       12: begin
  113.            Form13 := TForm13.Create (Application);
  114.           Form13.ShowModal;
  115.           Form13.Free;
  116.           end;
  117.       13: begin
  118.            Form14 := TForm14.Create (Application);
  119.           Form14.ShowModal;
  120.           Form14.Free;
  121.           end;
  122.       14: begin
  123.            Form15 := TForm15.Create (Application);
  124.           Form15.ShowModal;
  125.           Form15.Free;
  126.           end;
  127.       15: begin
  128.            Form16 := TForm16.Create (Application);
  129.           Form16.ShowModal;
  130.           Form16.Free;
  131.           end;
  132.       16: begin
  133.            Form17 := TForm17.Create (Application);
  134.           Form17.ShowModal;
  135.           Form17.Free;
  136.           end;
  137.       17: begin
  138.            Form18 := TForm18.Create (Application);
  139.           Form18.ShowModal;
  140.           Form18.Free;
  141.           end;
  142.       18: begin
  143.            Form19 := TForm19.Create (Application);
  144.           Form19.ShowModal;
  145.           Form19.Free;
  146.           end;
  147.       19: begin
  148.            Form20 := TForm20.Create (Application);
  149.           Form20.ShowModal;
  150.           Form20.Free;
  151.           end;
  152.        end;
  153.    end;
  154. end;
  155.  
  156. procedure TMainDialog.PrinterClick(Sender: TObject);
  157. begin
  158.     PrinterSetupDialog1.Execute;
  159. end;
  160.  
  161. procedure TMainDialog.ListBox1DblClick(Sender: TObject);
  162. begin
  163.     ViewClick(Sender);
  164. end;
  165.  
  166. end.
  167.